/**
 * @FilePath     : /src/lgmg_robots/agv_navigation/agv_navigate/include/agvWorld/world.h
 * @Description  : AGV地图类，提供与路径和节点相关的功能。
 * @Author       : xiujun.yang
 * @Version      : 1.0.0
 * @LastEditors  : haibo haibo.yang@lgmgim.cn
 * @LastEditTime : 2024-12-19 15:38:57
 * @Copyright (c) 2024 by 临工智能信息科技有限公司, All Rights Reserved. 
**/
#pragma once

#include <vector>
#include <stdio.h>
#include <time.h>
#include "path.h"

//////////////////////////////////////////////////////////////////////////////
//   The class of AGVS "Map".
class World : public NodeBase, public PathBase
{
public:
        // The default constructor
        World() = default;

        // The default destructor
        virtual ~World() = default;

        // Get the project data of a specified posture to a specified path
        bool GetProjectData(Posture &posture, Path *path, ProjectData *project_data);

        // Get the project data of a specified posture to the map
        bool GetProjectData(Posture &posture, ProjectData *project_data);

        // Get the node posture at atNode; atNode to dirNode creat a path
        bool GetNodePosture(unsigned short at_node, unsigned short dir_node, Posture &posture);

        // Load a agv's path map(mapTest.xml)
        bool LoadMap(const std::string &map_path);

        // Get the map id
        std::string GetMapId() const;
};
